<%@page import="dao.ShopInfo"%>
<%@page import="dao.ShopDao"%>
<%@page import="bean.Shop"%>
<%@page import="bean.User"%>
<%@page import="dao.UserInfo"%>
<%@page import="dao.UserDao"%>
<%@ taglib uri="http://java.sun.com/jstl/core_rt" prefix="c"%>
<%@ page language="java" import="java.util.*" pageEncoding="UTF-8"%>
<%
	String path = request.getContextPath();
	String basePath = request.getScheme() + "://"
	+ request.getServerName() + ":" + request.getServerPort()
	+ path + "/";
%>

<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<html>
<head>
<base href="<%=basePath%>">
<title>爱尚商城_首页</title>
<link rel="stylesheet" type="text/css" href="css/asale.css" />
<script type="text/javascript" src="js/jquery.min.js"></script>
</head>
<%
	//设置请求对象的字符编码格式
		request.setCharacterEncoding("utf-8");
		Shop shop=new Shop();
		ShopDao dao=new ShopInfo();
		ArrayList<Shop> list = dao.selectAll();
		HttpSession sess = request.getSession();
		sess.setAttribute("list", list);
%>
<body>
	<div class="siteNav">
		<div class="bodyMain">
			<div class="L Welogin">
				您好，欢迎来到<span class="activespan">爱尚礼品官网</span>！
			</div>
			<ul id="JsQuickMemu" class="R">
				<li><a href="">
						<%
							if(request.getSession().getAttribute("name") != null){
						%><%=request.getSession().getAttribute("name")%></a>
					<%
						}else{
					%><a href="./login.jsp" target="_blank">【 登陆 】<%
						}
					%></a><span>|</span>
				</li>
				<%
					if(request.getSession().getAttribute("name") != null){}else{
				%><li><a
					href="./reg.jsp" target="_blank">【 免费注册 】</a><span>|</span>
					<%
						}
					%></li>
				<li><a href="">会员中心</a><span>|</span></li>
				<li><a href="">我的订单</a></li>
				<li><a href="" class="cart">购物车（0）</a><span>|</span></li>
				<li><a href="" target="_blank">帮助中心</a></li>
			</ul>
		</div>
	</div>
	<div class="bodyMain header">
		<a href="index.html" class="L logo" target="_blank"><img
			src="images/logo.gif" width="160" height="90" alt="爱尚商城logo" /></a>
		<div class="phcSearch L">
			<form action="products_list.jsp" method="get" id="searchForm"
				name="searchForm" onSubmit="return checkSearchForm()"
				class="search-form">
				<input class="search_input L" type="text" name="keywords"
					id="keyword" value="请输入您想要的商品" autocomplete="off"> <input
					type="hidden" value="k1" name="dataBi">
				<button type="submit" class="submit_btn L"></button>
			</form>
			<div class="search-hot" id="hotKeywordsShow"></div>
		</div>
		<div class="R tel">
			<img src="images/tel.gif" width="215" height="65" alt="爱尚商城电话" />
		</div>
	</div>
	<div class="menu">
		<div class="nav">
			<ul class="clearfix">
				<li><a href="index.jsp" class="current">首页</a></li>
				<li><a href="activeshoes.jsp">礼品定制</a></li>
				<li><a href="pages.jsp">客户案例</a></li>
				<li><a href="choice.jsp">定制流程</a></li>
				<li><a href="active_list.jsp">礼品专题</a></li>
			</ul>
		</div>
		<!--所有分类 Start-->
	</div>
	<!--导航 End-->

	<div id="bn">
		<span class="tu"> <a href="#" class="lianjie"><img
				src="images/ban01.jpg" height="490" /></a> <a href="#" class="lianjie"
			style="display:none"><img src="images/ban02.jpg" height="490" /></a>
			<a href="#" class="lianjie" style="display:none"><img
				src="images/ban03.jpg" height="490" /></a> <a href="#" class="lianjie"
			style="display:none"><img src="images/ban04.jpg" height="490" /></a></span>
		<div id="hao">
			<a class="xu">1</a> <a class="xu">2</a> <a class="xu">3</a> <a
				class="xu">4</a>
		</div>
		<div class="tiao"></div>
	</div>
	<!--hot-sale product start-->
	<div class="bodyMain HotProducts">
		<div class="HotTitle">
			<h2>
				热销产品 /<span> hot-sale product</span>
			</h2>
		</div>
		<ul class="carousel" id="carousel-default">
			<c:forEach items="${list}" var="s">
				<li id="slide">
					<div class="pic">
						<a href="products_show.jsp?=${s.sId}" target="_blank"><img src="${s.sPic}" /></a>
					</div>
					<div class="title">

						<a href="#" target="_blank">
							<h2>${s.sName}</h2>
							<p>${s.sText}</p> <span>${s.sPrice}</span>
						</a>
					</div>
				</li>
			</c:forEach>
		</ul>

		<script type="text/javascript" src="js/purejscarousel.js"></script>
		<script>
			$("#goleft").imgscroll({
				speed : 40,
				amount : 0,
				width : 1,
				dir : "left"
			});
		</script>

	</div>
	<!--New listing product start-->
	<div class="bodyMain NewsProducts">
		<div class="HotTitle">
			<h2>
				新品上市 /<span> New listing</span>
			</h2>
		</div>
		<ul class="carousel" id="carouselDefault">
			<c:forEach items="${list}" var="s">
				<li id="slide">
					<div class="pic">
						<a href="#" target="_blank"><img src="${s.sPic}" /></a>
					</div>
					<div class="title">

						<a href="#" target="_blank">
							<h2>${s.sName}</h2>
							<p>${s.sText}</p> <span>${s.sPrice}</span>
						</a>
					</div>
				</li>
			</c:forEach>

		</ul>

		<script>
			var carouselDefault = new PureJSCarousel({
				carousel : '#carouselDefault',
				slide : '#slide'
			})
		</script>


	</div>

	</div>
	<div class="HomeProducts">
		<!--1F start-->
		<div class="bodyMain">
			<div class="pro_title">
				<span>1F</span>
				<h2>数码家电</h2>
				<ul class="HomeSpan R">
					<a href="#">进入></a>
				</ul>
			</div>
			<div class="bodyMain proMain">
				<a class="pro_ad L"> <img src="images/pro_ad1.jpg" width="240"
					height="570" alt="" />
				</a>
				<div class="ProHomeMain R">
					<ul class="Prolist">
						<c:forEach items="${list}" var="s">
							<li id="slide">
								<div class="pic">
									<a href="#" target="_blank"><img src="${s.sPic}" /></a>
								</div>
								<div class="title">

									<a href="#" target="_blank">
										<h2>${s.sName}</h2>
										<p>${s.sText}</p> <span>${s.sPrice}</span>
									</a>
								</div>
							</li>
						</c:forEach>
					</ul>
				</div>
			</div>
		</div>

		<!-- 2F start -->
		<div class="bodyMain">
			<div class="pro_title">
				<span>2F</span>
				<h2>品牌折扣</h2>
				<ul class="HomeSpan R">
					<a href="#">进入></a>
				</ul>
			</div>
			<div class="bodyMain proMain">
				<a class="pro_ad L"> <img src="images/pro_ad2.jpg" width="240"
					height="570" alt="" />
				</a>
				<div class="ProHomeMain R">
					<ul class="Prolist">
						<c:forEach items="${list}" var="s">
						<li>
							<div class="Proimg">
								<a href="#"><img src="${s.sPic}" width="231"
									height="180" alt="" /></a>
							</div>
							<div class="ProTxt">
								<a href="#">
									<h2>${s.sName}</h2>
									<p>${s.sText}</p> <span>${s.sPrice}</span>
								</a>
							</div>
						</li>
						</c:forEach>
						
					</ul>
				</div>
			</div>
		</div>
		<!--right qq start-->
		<div class="side">
			<ul>
				<li style="border:none;"><a href="javascript:goTop();"
					class="sidetop"><img src="images/side_icon05.png"></a></li>
			</ul>
		</div>
		<script type="text/javascript" src="js/script.js"></script>
</body>
</html>